import { request } from '@/service/request';
import type { Developer, DictTypeVo } from '@/service/types/developer';

export function getPageList(params: DictTypeVo) {
  return request<Developer.DictTypeVO>({
    url: '/system/dict/type/list',
    method: 'get',
    params
  });
}

export function addDictType(data: DictTypeVo) {
  return request({
    url: '/system/dict/type',
    method: 'post',
    data
  });
}

export function editDictType(data: DictTypeVo) {
  return request({
    url: '/system/dict/type',
    method: 'put',
    data
  });
}

export function delDictType(id: number | number[]) {
  return request({
    url: `/system/dict/type/${id}`,
    method: 'DELETE'
  });
}

export function getDictType(id: number) {
  return request<DictTypeVo>({
    url: `/system/dict/type/${id}`,
    method: 'get'
  });
}
